﻿{% extends "fnr/base.html" %}
{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's home page.
  
  Created on 2008-08-15.
  $Id: resto.html 275 2008-11-13 16:21:33Z heavyzheng $
-->
{% endcomment %}

{# ---------------------------------------------------------------------------------------------- #}

{% block html_head %}

<link rel="stylesheet" type="text/css" media="screen" href="/static/fnr/stylesheets/resto.css"/>

<title>{{ resto.full_name }} :: Foods N' Roses</title>

{% include "fnr/google_maps_api.html" %}

<script type="text/javascript">//<![CDATA[

function initTabs() {
    var options = { fx : { height: "toggle" } };
    $("#resto_tab_container > #resto_tab_nav").tabs(options);
}

$(document).ready( function() {
    initTabs();
} );

function closeMessage(id) {
    $(id + " .message").hide("slow");
}

function showEditForm(id) {
    $(id + " .form-toggle").hide();
    $(id + " .submitting" ).hide()
    $(id + " .edit-form"  ).show("slow");
}

function hideEditForm(id) {
    $(id + " .edit-form"  ).hide();
    $(id + " .submitting" ).hide();
    $(id + " .form-toggle").show("slow");
}

function submitEditForm(id) {
    $(id + " .edit-form"  ).hide();
    $(id + " .form-toggle").hide();
    $(id + " .submitting" ).show("slow");
    
    var data = $(id + " .edit-form").serialize();
    var url  = $(id + " .edit-form").attr("action");
    var options = { type    : "POST",
                    url     : url,
                    data    : data,
                    success : function(data) { $(id).after(data).remove(); }
                  };
    $.ajax(options);    
}

//]]></script>

{% endblock %}{# html_head #}

{# ---------------------------------------------------------------------------------------------- #}

{% block content %}

{% include "fnr/sections/resto_names.html" %}

<div class="container">
  {% include "fnr/sections/resto_logo.html" %}
  {% include "fnr/sections/resto_address.html" %}
  {% include "fnr/sections/resto_desc.html" %}
  {% include "fnr/sections/resto_contact.html" %}
</div><!--/.container-->

{% include "fnr/sections/resto_rating.html" %}

{% if user %}
  <div><a href="/fnr/resto/{{ resto.uid }}/post_opinion/">Your opinion?</a></div>
{% else %}
  <div><a href="{{ log_url }}">Login to add your opinion?</a></div>
{% endif %}

{% include "fnr/sections/resto_tags.html" %}
{% include "fnr/sections/resto_best_dishes.html" %}

<div id="resto_tab_container">

  <ul id="resto_tab_nav">
    <li><a href="#resto_selected_tab"><span>Map</span></a></li>
    <li><a href=".?section=resto_comments"><span>Comments ({{ resto.comments }})</span></a></li>
    <li><a href=".?section=resto_photos"><span>Photos</span></a></li>
  </ul>
  
  <div id="resto_selected_tab">
    {% include "fnr/sections/resto_map.html" %}
  </div><!--/#resto_selected_tab-->

</div><!--/#resto_tab_container-->

{% include "fnr/sections/resto_footer.html" %}

{% endblock %}{# content #}



